function []=range(I)
I=double(I);
H=size(I,1);
W=size(I,2);

YCbCr=rgb2ycbcr(I);
cr=YCbCr(:,:,3);
y=YCbCr(:,:,1);
cb=YCbCr(:,:,2);
S=zeros(H,W);
[SkinIndexRow,SkinIndexCol] =find(10<cr & cr<45);
for i=1:length(SkinIndexRow)
    S(SkinIndexRow(i),SkinIndexCol(i))=1;
end
yavg=0;
cbavg=0;
cravg=0;

ymin=y(SkinIndexRow(1),SkinIndexCol(1));
cbmin=cb(SkinIndexRow(1),SkinIndexCol(1));
crmin=cr(SkinIndexRow(1),SkinIndexCol(1));
for i=1:length(SkinIndexRow)
    yavg=yavg+ y(SkinIndexRow(i),SkinIndexCol(i));
    cbavg=cbavg+ cb(SkinIndexRow(i),SkinIndexCol(i));
    cravg=cravg+ cr(SkinIndexRow(i),SkinIndexCol(i));
end
yavg=yavg/length(SkinIndexRow);
cbavg=cbavg/length(SkinIndexRow);
cravg=cravg/length(SkinIndexRow);

yavg=uint8(abs(yavg));
cbavg=uint8(abs(cbavg));
cravg=uint8(abs(cravg));

yavg
cbavg
cravg